﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/OneColumn.Master" AutoEventWireup="true"
    CodeBehind="Contact.aspx.cs" Inherits="SharingCenter.Web.User.CurrentProfile.Contact" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    联系方式
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .messengerpane
        {
            padding-left: 400px;
        }
        .addrpane
        {
            width: 350px;
        }
        .impane
        {
            width:500px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/User/CurrentProfile/Contact.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <myuc:GenericTabs ID="GenericTabs1" runat="server" Section="Settings" SelectedItem="cont" />
    <h1 class="bb">
        <span class="nss ns-addrbook"></span>
        <span class="iconlabel">联系方式</span>
        </h1>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
            <asp:FormView ID="FormView1" runat="server" DataKeyNames="UserId" DefaultMode="Edit"
                DataSourceID="LinqDataSource1" Width="100%">
                <EditItemTemplate>
                    <div class="fc formtable">
                        <div class="left addrpane">
                             <h3 class="w5">地址电话</h3>
                            <table style="border-collapse:collapse;">
                                <tr>
                                    <td valign="top">
                                        地址:
                                    </td>
                                    <td>
                                        <asp:TextBox TextMode="MultiLine" Rows="2" ID="AddressTextBox" runat="server" Text='<%# Bind("Address") %>' />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        邮编:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="PostalCodeTextBox" runat="server" Text='<%# Bind("PostalCode") %>' />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        电话:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="PhoneTextBox" runat="server" Text='<%# Bind("Phone") %>' />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        手机:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MobileTextBox" runat="server" Text='<%# Bind("Mobile") %>' />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        隐私程度:
                                    </td>
                                    <td>
                                       <cc:PrivacyDropDownList runat="server" ID="addrPrivacy" OnLoad="addrPrivacy_Load" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="messengerpane">
                            <span class="hiddenim">
                                <asp:HiddenField ID="HiddenField1" runat="server" Value='<%#Bind("Messengers") %>' />
                            </span>
                            
                            <h3 class="w5">即时通讯</h3>
                            <div id="imcont">
                                <table class="tb-full">
                                    <tbody>
                                    </tbody>
                                </table>
                            </div>
                            <div>
                                <a class="pointer openim">
                                <img src="../../Content/images/icons/add_small.png" alt="" />
                                添加一条</a>
                            </div>
                            <div class="dialogform" title="添加即时通讯">
                                <div class="impane">
                                    <div>
                                        <table>
                                            <tr>
                                                <td>
                                                    名称:
                                                </td>
                                                <td>
                                                    <select id="imnamesel">
                                                        <option value="WLM">MSN</option>
                                                        <option value="QQ">QQ</option>
                                                        <option value="POPO">泡泡</option>
                                                        <option value="SKYPE">SKYPE</option>
                                                        <option value="">其他</option>
                                                    </select>
                                                    <input class='iminput' type="text" id="imname" />
                                                    *如：MSN, QQ等
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    账号:
                                                </td>
                                                <td>
                                                    <input class='iminput' type="text" id="imvalue" />
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div class="actionarea">
                                        <span class="submitbutton closemodalformbutton-nostyle additem">确定</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="actionarea">
                        <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                            CssClass="submitbutton saveitem" Text="确定" />
                    </div>
                </EditItemTemplate>
            </asp:FormView>
            <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="SharingCenter.Web.Classes.scDataContext"
                EnableInsert="True" EnableUpdate="True" TableName="Sc_Addresses" Where="UserId == @UserId">
                <WhereParameters>
                    <asp:ProfileParameter DbType="Guid" Name="UserId" PropertyName="UserId" />
                </WhereParameters>
            </asp:LinqDataSource>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
